﻿package com.lynn.salary.entity;

public class RolePermission {

	private String roleId;
	private String persId;

	/**
	 * 获取所有字段
	 * 
	 * @return
	 */
	public static String[] getFields() {

		return new String[] { "roleId", "persId" };
	}

	/**
	 * 获取表名
	 * 
	 * @return
	 */
	public static String getTableName() {

		return "rolepermission";
	}

	/**
	 * 获取主键名字
	 * 
	 * @return
	 */
	public static String getPkName() {

		return "roleId";
	}

	public static Object[] getFk(String field) {
		if (field.equals("roleId")) {
			return new Object[] { Role.class, "id" };
		} else if (field.equals("persId")) {
			return new Object[] { Permission.class, "id" };
		} else
			return null;
	}

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getPersId() {
		return persId;
	}

	public void setPersId(String persId) {
		this.persId = persId;
	}

}
